#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
    vector<string> A;
    string slova[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
    int s = 0;
    string input;
    getline(cin, input);
    string word = "";
    for (char c : input) {
        if (c == ' ') {
            A.push_back(word);
            word = "";
        }
        else {
            word += c;
        }
    }
    A.push_back(word);
    if (A.size() == 3) {
        for (int i = 0; i < 3; i++) {
            if (find(begin(slova), end(slova), A[i]) != end(slova)) {
                break;
            }
        }
    }
    else {
        cout << "Wrong input" << endl;
    }
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 10; j++) {
            if (A[0] == slova[j]) {
                s = j * 100;
            }
            if (A[1] == slova[j]) {
                s += j * 10;
            }
            if (A[2] == slova[j]) {
                s += j * 1;
            }
        }
    }
    cout << s << endl;
    return 0;
}
